"""mydjango URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url,include
from django.contrib import admin
from django.urls import path,re_path
from django.views.static import serve
from userapp.views import *


urlpatterns = [
    #定义超链接路由
    re_path('^static/upload/(?P<path>.*)$',serve,{'document_root':'/static/upload/'}),
    path('',Index.as_view()),
    path('sms/',EmailView.as_view()),
    path('adminreg/',AdminRegView.as_view()),
    path('active/',active_user),
    path('getcode/', GetCode.as_view()),
    path('reg/', Reg.as_view()),
    path('login/', UserLogin.as_view()),
    path('uploadfile/', UploadFile.as_view()),
    path('changeweb/', ChangeWeb.as_view()),
    #管理员用户登录接口
    path('admin_login/', Admin_login.as_view()),
    #管理员用户个人信息修改接口
    path('adminchange/', Admin_change.as_view()),
    path('userinfo/',UserInfo.as_view()),
    path('userlist/', UserList.as_view()),
    path('more_del/', More_del.as_view()),
    path('getcourse/', GetCourse.as_view()),
    path('courseinfo/', CourseInfo.as_view()),
    path('getcoursetype/', GetCourseType.as_view()),
    path('getcoursetag/', GetCourseTag.as_view()),
    path('getuserinfo/', GetUserInfo.as_view()),
    path('is_true/', Is_True.as_view()),


    # 微博扫码登录
    path('weibo/',weibo),
    # 钉钉扫码登录
    path('dingding_back/',dingding_back),
    path('getattcourse/' ,GETUserCourse.as_view()),
    path('user_course/',User_course.as_view()),
    path('showUserPath/',GETUserPath.as_view()),
    path('user_path/',User_path.as_view()),
    path('couponsinfo/', CouponsInfo.as_view()),
    path('usercouponsinfo/', UserCouponsInfo.as_view()),
]
